﻿using GxTsSharp.Models;

namespace StockIndex
{
    public class Util
    {
        public static string GetStrMarketId(EMarketID marketId)
        {
            return marketId == EMarketID.Market_SH ? "SH" : (marketId == EMarketID.Market_SZ ? "SZ" : "?");
        }

        public static string GetStockCodeKey(string stockCode, EMarketID marketId)
        {
            return $"{stockCode}.{GetStrMarketId(marketId)}" ;
        }
        
        public static string GetStockCodeKey(string stockCode, string strMarketId)
        {
            return $"{stockCode}.{strMarketId}";
        }
    }
}